<template>
  <h1>我是app根组件</h1>
  <h4>姓名：{{ name }}</h4>
  <button @click="rename">改名</button>
  <a1></a1>
</template>

<script>
import a1 from "./components/a1.vue";
import { ref } from "vue";
export default {
  name: "App",
  setup() {
    let name = ref("陈坤");
    function rename() {
      name.value = "张三";
      console.log(name);
    }
    return { name, rename };
  },
  components: {
    a1,
  },
};
</script>

<style>
</style>
